package com.star.result;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

/**
 * 分布模型
 *
 * @author tanyapeng
 */
@Data
public class Pagination {
    private int page = 1;
    private int pageSize = 10;

    /**
     * 计算偏移量
     *
     * @return
     */
    @JsonIgnore
    public int getOffset() {
        return (this.page - 1) * this.pageSize;
    }
}
